package io.tim.application.judge.form;

import io.tim.mvc.form.ActionForm;

/**
 * 登陆业务的判断 ActionForm 类
 * @author Zhang Nan
 * @since 2017/02/21
 *
 */
public class LoginJudgeForm extends ActionForm implements Comparable<Object>{
	
	private String username = "";
	private String password = "";
	
	public LoginJudgeForm() {
		
	}

	public LoginJudgeForm(String username, String password) {
		super();
		this.username = username;
		this.password = password;
	}
	
	

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Override
	public int compareTo(Object arg0) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((password == null) ? 0 : password.hashCode());
		result = prime * result + ((username == null) ? 0 : username.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		LoginJudgeForm other = (LoginJudgeForm) obj;
		if (password == null) {
			if (other.password != null)
				return false;
		} else if (!password.equals(other.password))
			return false;
		if (username == null) {
			if (other.username != null)
				return false;
		} else if (!username.equals(other.username))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "LoginJudgeForm [username=" + username + ", password=" + password + "]";
	}
	
	

}
